package com.atguigu.tingshu.payment.service;

import com.atguigu.tingshu.common.result.Result;
import com.wechat.pay.java.service.payments.model.Transaction;
import jakarta.servlet.http.HttpServletRequest;

import java.util.Map;

public interface WxPayService {

    /**
     * 创建微信支付二维码
     * @param paymentType
     * @param orderNo
     * @return
     */
    Map<String, Object> createJsapi(String paymentType, String orderNo);

    /**
     * 查询支付状态
     * @param orderNo
     * @return
     */
    Result<Boolean> queryPayStatus(String orderNo);

    /**
     * 微信异步回调接口
     * @param request
     */
    void asyncNotify(HttpServletRequest request);

    /**
     * 测试接口 生成支付二维码
     * @param paymentType
     * @param orderNo
     * @param userId
     * @return
     */
    Map<String, Object> createNative(String paymentType, String orderNo, Long userId);
}
